<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<style type="text/css">
.col-sm-3 {
	width: 15%;
	float: left;
	text-align: right;
}

.col-sm-9 {
	width: 85%;
	float: left;
	text-align: left;
}

label[class^="btn btn-default"] {
	margin-top: -4px;
}
</style>
</head>
<body>
	<div class="l_err" style="width: 100%; margin-top: 2px;"></div>
	<form action="${ctx}/emp/uploadExcel" name="Form" id="Form"
		method="post" enctype="multipart/form-data">
		<div id="zhongxin">
			<table style="width: 95%;">

				<tr>
					<td style="padding-top: 20px;">
					<input id="excelFile"
						name="excelFile" type="file" multiple accept=".xls,.xlsx"> <br></td>
				</tr>
				<tr>
					<td style="text-align: center;">
					<a
						class="btn btn-mini btn-primary" onclick="save();">导入</a> <a
						class="btn btn-mini btn-success"
						onclick="window.location.href='${ctx}/emp/downExcel.shtml'">下载模版</a>
					</td>
				</tr>
			</table>
		</div>
		<div id="zhongxin2" class="center" style="display: none">
			<br />
			<img src="static/images/jzx.gif" /><br />
			<h4 class="lighter block green"></h4>
		</div>
	</form>
	<!-- <script type="text/javascript">
	onloadurl();
	</script> -->
	<script type="text/javascript"
		src="${ctx}/notebook/notebook_files/bootstrap-filestyle.min.js"></script>
	<script>
		//保存
		function save() {
			if ($("#excelFile").val() == ""
					|| document.getElementById("excelFile").files[0] == '请选择xls格式的文件') {
				layer.msg("请上传xls格式的文件！");
				return false;
			}
			$("#Form").submit();
			$("#zhongxin").hide();
			$("#zhongxin2").show();
		}
		function fileType(obj) {
			var fileType = obj.value.substr(obj.value.lastIndexOf("."))
					.toLowerCase();//获得文件后缀名
			if (fileType != '.xls') {
				layer.msg("请上传xls格式的文件！");
				$("#excelFile").val('');
				document.getElementById("excel").files[0] = '请选择xls格式的文件';
				return;
			}
		}
	</script>
</body>
</html>